package com.uwlaser.service.impl;

import com.uwlaser.base.impl.CommonServiceImpl;
import com.uwlaser.domain.RolesFactoryModels;
import com.uwlaser.service.RolesFactoryModelsServices;
import com.uwlaser.service.mapper.RolesFactoryModelsMappers;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@AllArgsConstructor
@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class RolesFactoryModelsServiceImpls extends CommonServiceImpl<RolesFactoryModelsMappers, RolesFactoryModels> implements RolesFactoryModelsServices {

    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean removeFactoryModelId(Integer id) {
        return lambdaUpdate().eq(RolesFactoryModels::getFactoryModelId, id).remove();
    }
}
